package com.eshop.common.constant;

import com.eshop.common.util.io.PropertyUtil;

/**
 * @author Administrator
 */

public class CoreConstant {
	// 属性文件配置名称
	public static final String PROPERTY_FILE_NAME = "project";
	// 验证码
	public static String RAND_CODE = "user_rand_code";
	// 后台用户存seesion用
	public static String SYS_USER_SESSION_NAME = "sys_user_ukey";
	public static String USER_SESSION_NAME = "USER_SESSION_NAME";
	// 读取配置文件类
	public static PropertyUtil propertyUtil = PropertyUtil.getInstance("project");
	// 项目路径
	public static String contextPath = propertyUtil.getProperty("contextPath");
	// 图片、CSS、js 服务器地址
	public static String imagesPath = propertyUtil.getProperty("imagesPath");

	// 上传服务用服务器地址，访问时用imagesPath，数据库中不存储域名
	public static String uploadServerUrl = propertyUtil.getProperty("uploadServerUrl");
	public static String VERSION = propertyUtil.getProperty("version");
	/*
	 * 上传图片后访问的地址，使用imagesPath或者uploadServerUrl防止项目部署到多台机器，单独定义此变量
	 */
	public static String uploadStaticUrl = propertyUtil.getProperty("uploadStaticUrl");

	public static String USER_SECURITY_KEY = "user_security_key";
	public static String MANAGER_SESSION_KEY="admin_session_key";

	/*
	 * eshop中各种状态
	 */
	public static final int EORDER_STATUS_All=-1;//所有状态
	
	public static final int EORDER_STATUS_NEW=0;//新建
	
	public static final int EORDER_STATUS_RECEIVED=1;//商家接单
	
	public static final int EORDER_STATUS_REFUSE=2;//商家拒绝
	
	public static final int EORDER_STATUS_CANCEL=3;//被取消，或超时
	
	public static final int EORDER_STATUS_DOING=4;//配送中
	
	public static final int EORDER_STATUS_FINISHED=5;//订单已完成
	
	public static final int EORDER_STATUS_PICKING =6;//配货中
	
	/*
	 * 商户在线状态
	 */
	public static final int SHOPPER_IS_OUTLINE=0;//商户离线
	
	public static final int SHOPPER_IS_ONLINE=1;//商户在线
}
